package lab02.test21;

/**
 * Created by V555 on 2017/10/29.
 */
public class Test {
    public static void main(String[] args) {
        char tmp;
        int sum=0;
        String name="hello,world";
        for (int i=0;i<name.length();i++){
            tmp=name.charAt(i);
            if (tmp=='l')
                sum=sum+1;
        }
        System.out.println("给定字符l出现的频率:");
        System.out.println(sum);
    }
}
